//
//  WithdrawalsVC.m
//  SelfDriving
//
//  Created by apple on 16/1/20.
//  Copyright © 2016年 apple. All rights reserved.
//
//xhw2018-1-11:提现ctrl
#import "WithdrawalsVC.h"
#import "BusinessService+WD.h"

@interface WithdrawalsVC ()
@property (weak, nonatomic) IBOutlet UITextField *feeField;
@property (weak, nonatomic) IBOutlet UILabel *feeLabel;

@end

@implementation WithdrawalsVC

- (void)viewDidLoad {
    [super viewDidLoad];
//    _feeLabel.text = [NSString stringWithFormat:@"当前余额:%@",[ValidateHelper numberFormat:[AppDelegate shareDelegate].user.money]];
    //xhw2018-1-11改bug15026
    _feeLabel.text = [NSString stringWithFormat:@"当前余额:%@",[AppDelegate shareDelegate].user.money];
    
}
-(void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{
    [self.view endEditing:YES];
}
- (IBAction)submitAction:(UIButton *)sender {
    [self.view endEditing:YES];
    NSMutableDictionary *dic = [[NSMutableDictionary alloc]init];
    [dic setObject:_feeField.text forKey:@"fee"];
    [[BusinessService shareInstance]withdraw:dic success:^(id result) {
        [SVProgressHUD showSuccessWithStatus:@"申请提现成功，请等待后台审核"];
        [self.navigationController popViewControllerAnimated:YES];
    } failure:^(id result) {
        [SVProgressHUD showErrorWithStatus:result];
    }];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
- (IBAction)backActino:(id)sender {
    [self.navigationController popViewControllerAnimated:YES];
}
/*
 #pragma mark - Navigation
 
 // In a storyboard-based application, you will often want to do a little preparation before navigation
 - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
 // Get the new view controller using [segue destinationViewController].
 // Pass the selected object to the new view controller.
 }
 */

@end
